<template>
  <div class="homebox">
	  <div class="boxrr">
      <van-nav-bar :title="$t('textTrans.认购记录')" left-arrow @click-left="onClickLeft" @click-right='goRight' >
	  </van-nav-bar>
    <div class="noticeWrap">
		<div style="display: flex;">
		<!-- 	<div v-for="(item,index) in noticeList" :key='index' style="margin-bottom: 15px;margin-left: 15px;">
				<div @click="getid(item)" :style="draw_id==item.id?'text-align:center;color: white;border-radius: 5px;padding: 6px 8px;background: #0F1F36;border: 1px solid #4E679C;font-size: 14px;':'text-align:center;color: white;border-radius: 5px;padding: 6px 8px;background: #0F1F36;border: 1px solid #0F1F36;font-size: 14px;'">{{item.name}}</div>
			</div> -->
			</div>
			<div>
     <div v-for="(item,index) in list" >
		  <div style="background: #131E30;border-radius: 5px;padding: 15px 10px;display:flex ;color: white;font-size: 15px;width: 88%;margin: 5px auto;margin-top: 10px;">
			  <div >
				  <div >
				  				{{$t('textTrans.订单号')}}:	 {{item.order_no}}
				  </div>
				 
				
					<div  style="margin-top: 6px;color: #ccc;">
								{{$t('textTrans.付款金额')}}	：	  {{item.pay_price}}
					</div>
					<div style="color: #ccc 	;margin-top: 6px;">
					{{$t('textTrans.数量')}}:	{{item.price}}
					  </div>
					  <div style="color: #ccc;margin-top: 6px;">
					  									  {{item.create_time}}
					  </div>
			  </div>
			<!-- 	  <div style="width: 50%;text-align: right;">
				  <div style="color: #FD6F7D;font-size: 17px;">
				{{$t('textTrans.金额')}}	{{item.price}}
				  </div>
				  <div  style="margin-top: 6px;color: #ccc;">
				  			{{$t('textTrans.付款金额')}}		  {{item.pay_price}}
				  </div>
			  </div> -->
		  </div>
	 </div>
		</div>
		
    </div>
	</div>
  </div>
</template>

<script>
import { Sticky } from 'vant';
import { orderList,configDrawList,drawRecordList } from "../../api/home";
import {backpage} from "@/utils/backPage"
import { getParams } from "@/utils/getParams";
export default {
  data() {
    return {
      noticeList: [
		  {name:this.$i18n.t("textTrans.待审核"),id:'0'},
		  {name: this.$i18n.t("textTrans.已审核"),id:'1'},
	  ],
	  draw_id:"",
	  list:[],
	  money:"",
	  address:"",
	  cuname:"",
	  cardinal_number:"",
	  pay_password:"",
    };
  },
  created() {
		  this.draw_id=this.noticeList[0].id
		  this.getlist()
  },
  methods: {
	  getlist(){
		  orderList({status:this.draw_id}).then(res=>{
		  		  console.log(res)
		  		  this.list=res
		  })
	  },
	  goRight(){
		  this.$router.push({path:"withdrawRecord"})
	  },
	  getrate(){
		  this.rate= this.noticeList[0].rate/100*this.money
	  },
	  getid(item){
		  this.draw_id=item.id
		  this.getlist()
	  },
	  submit(){
		  let data={
			  draw_id:this.draw_id,
			  money:this.money,
			  address:this.address,
			  pay_password:this.pay_password
		  }
		  drawCommit(data).then(res=>{
			  this.money=''
			  this.address=''
			  this.pay_password=''
			  this.rate=''
			  
		  })
	  },
    onClickLeft() {
		this.$router.go(-1)
    }
  }
};
</script>

<style scoped lang="less">
	.boxrr{
	// width: 100%;background: url('../../assets/imgs/home/beijing.png') no-repeat;		background-size: 100% 100%;
	}
	/deep/.van-cell{
		background: transparent;
		color: white;
	}
	/deep/.van-field__control{
		color: white;
	}
	.homebox{
		width: 100%;
		height: 100%;
		// background: url('../../assets/imgs/home/beijing.png') no-repeat;
		background-size: 100% 100%;
	}
	.van-nav-bar{
		background: #041025;
		/deep/.van-nav-bar__title{
			color:#326964;
			margin-left: 40px;
		}
	}

.noticeWrap {
  padding: 0 0px;
  margin-top: 11px;

}
</style>
